﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>StatusBar</title>
    <link href="../../Content/style/style.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">


        //获得当前时间,刻度为一千分一秒

        var initializationTime = (new Date()).getTime();

        function showLeftTime() {

            var now = new Date();

            var year = now.getYear();

            var month = now.getMonth();

            var week = now.getDay();

            switch (week) {
                case 1:
                    weekday = "一";
                    break;
                case 2:
                    weekday = "二";
                    break;
                case 3:
                    weekday = "三";
                    break;
                case 4:
                    weekday = "四";
                    break;
                case 5:
                    weekday = "五";
                    break;
                case 6:
                    weekday = "六";
                    break;
                case 0:
                    weekday = "日";
                    break;
            }
            var day = now.getDate();

            var hours = now.getHours();

            var minutes = now.getMinutes();

            var seconds = now.getSeconds();

            document.all.show.innerHTML = "" + year + "年" + month + "月" + day + "日  星期" + weekday + "   " + hours + ":" + minutes + ":" + seconds + "";

            //一秒刷新一次显示时间

            var timeID = setTimeout(showLeftTime, 1000);

        }
        function Exit() {
            $.ajax({
                type: "POST",
                url: "/Account/ExitSysTem",
                success: function (json) {
                    window.parent.location.href = "/Account/LogOn";
                }
            });
        }
        function Modify() {
            window.parent.MainFrm.location.href = "/Account/ModifyPassword";
        }
        function sideSwitch() {
            if (parent.document.getElementById('attachucp').cols == "200,*") {
                parent.document.getElementById('LeftFrm').style.display = "";
                parent.document.getElementById('attachucp').cols = "0,*";
            }
            else {
                parent.document.getElementById('attachucp').cols = "200,*";
                parent.document.getElementById('LeftFrm').style.display = ""
            }
        }
    </script>
    <script type="text/javascript">        javascript: window.history.forward(1);</script>
    <!--一旦用户安全退出系统之后，浏览器回退则失效，不能回到登录状态 !-->
</head>
<body id="header" onload="showLeftTime()">
    <div id="sitetitle">
        <strong>后台管理系统</strong></div>
    <div id="topmenu">
        <%=ViewData["Menu"] %>
    </div>
    <a href="javascript:;" onclick="sideSwitch();" id="sideswitch" class="opened">隐藏侧栏</a>
    <div id="topinfo">
        <ul>
            <li>当前登陆用户：<strong><%=ViewData["UserName"] %></strong></li>
            <li><a href="http://www.eee114.com" target="_blank">网站首页</a></li>
            <li><a href="#" onclick="Exit()">安全退出</a></li>
            <li><a href="#" onclick="Modify()">修改密码</a></li>
            <li>
                <label id="show">
                </label>
            </li>
        </ul>
    </div>
</body>
</html>
